﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Webcam_Filter
{
    public class LeegFilter : Filter
    {
        protected override void runfilter(byte[] rgbValues, int hoogte, int breedte, string[] args)
        {
            int totaalAantalPixels = hoogte * breedte * 4;
            for (int i = 0; i < totaalAantalPixels; i += 4)
            {
                rgbValues[i] =(byte)(255- rgbValues[i + 1]);
                rgbValues[i + 1] =(byte)(255- rgbValues[i + 2]);
                rgbValues[i + 2] =(byte)(255- rgbValues[i]);
            }
        }
    }
}













